package com.ukee.birthday.modules.controller;

import com.ukee.birthday.common.utils.R;
import com.ukee.birthday.modules.entity.StaffEntity;
import com.ukee.birthday.modules.service.StaffService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class WxUserInfoController extends AbstractController{

    @Resource
    private StaffService staffService;

    /**
     * 微信用户信息
     */
    @GetMapping("/info/{id}")
    public R info(@PathVariable("id") Integer id){
        StaffEntity staffEntity = staffService.getById(id);
        return R.ok().put("info", staffEntity);
    }
}
